#pragma once

#include <Windows.h>
#include "Globals.h"


namespace Cartesia {


class CARTESIA_API Time
{

private:
	
	static LARGE_INTEGER _performanceCount1;
	static LARGE_INTEGER _performanceCount2;
	static LARGE_INTEGER _frequency;

	static double		_timeBetweenFrames;
	static double		_measureFpsSample;
	static int			_FPS;
	static long int		_frameCounter;

	static uint		_minutes;
	static uint		_seconds;
	static bool		_pause;

public:

	static void FirstMeasure();
	static void Measure();

	static void StartClock(unsigned int minutes, unsigned int seconds);

	static void Play();
	static void Pause();

	static uint GetMinutesPass()		{	return _minutes;	}
	static uint GetSecondsPass()		{	return _seconds;	}
	static inline float GetTimeBetweenFrames()	{	return (float) _timeBetweenFrames;	}
	static inline float GetDeltaT()				{	return (float) _timeBetweenFrames;	}

	static int	GetFPS() {	return _FPS;	}

	Time(void);
	~Time(void);
};


} // End Namespace
